package com.ruoyi.training.mapper;

import java.util.Date;
import java.util.List;
import com.ruoyi.training.domain.Invoice;
import org.apache.ibatis.annotations.Param;

/**
 * 发票信息Mapper接口
 * 
 * @author hcc
 * @date 2025-09-29
 */
public interface InvoiceMapper 
{
    /**
     * 查询发票信息
     * 
     * @param invoiceId 发票信息主键
     * @return 发票信息
     */
    public Invoice selectInvoiceByInvoiceId(String invoiceId);

    /**
     * 查询发票信息列表
     * 
     * @param invoice 发票信息
     * @return 发票信息集合
     */
    public List<Invoice> selectInvoiceList(Invoice invoice);

    /**
     * 新增发票信息
     * 
     * @param invoice 发票信息
     * @return 结果
     */
    public int insertInvoice(Invoice invoice);

    /**
     * 修改发票信息
     * 
     * @param invoice 发票信息
     * @return 结果
     */
    public int updateInvoice(Invoice invoice);

    /**
     * 删除发票信息
     * 
     * @param invoiceId 发票信息主键
     * @return 结果
     */
    public int deleteInvoiceByInvoiceId(String invoiceId);

    /**
     * 批量删除发票信息
     * 
     * @param invoiceIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInvoiceByInvoiceIds(String[] invoiceIds);

    /**
     * 查询发票信息通过缴费记录id
     * @param paymentRecordId
     * @return
     */
    public Invoice selectInvoiceByPaymentRecordId(String paymentRecordId);

    // 条件查询发票类型、状态和时间
    public List<Invoice> selectByPaymentRecordIdsAndConditions(@Param("paymentRecordIds") List<String> paymentRecordIds,@Param("invoiceType") String invoiceType,@Param("invoiceStatus") String invoiceStatus,@Param("issueStartTime") Date issueStartTime,@Param("issueEndTime") Date issueEndTime);
}
